//引入封装好的请求方式
import { get, post } from './index'

//菜单列表
export const getMenuList = () => get('/menulist?istree=true')

//菜单的添加
export const menuAdd = data => post('/menuadd', data)

//列表删除接口
export const menuDel = data => post('/menudelete', data)

//菜单获取一条数据接口
export const getMenuInfo = (data) => get('/menuinfo',data)

//菜单修改
export const menuEdit = data => post('/menuedit', data)
// =====================================================
//角色列表
export const getRoleList = () => get('/rolelist')

//角色的添加
export const roleAdd = data => post('/roleadd', data)

//角色列表删除接口
export const roleDel = data => post('/roledelete', data)

//角色获取一条数据接口
export const getRoleInfo = (data) => get('/roleinfo',data)

//角色修改
export const roleEdit = data => post('/roleedit', data)
// ===================================================
//管理员列表
export const getUserList = (data) => get('/userlist',data)

//管理员的添加
export const userAdd = data => post('/useradd', data)

//管理员列表删除接口
export const userDel = data => post('/userdelete', data)

//管理员获取一条数据接口
export const getUserInfo = (data) => get('/userinfo',data)

//管理员修改
export const userEdit = data => post('/useredit', data)

// 管理员总数
export const userCount = () => get('/usercount')

// 管理员登录
export const userLogin = (data) => post('/userlogin', data)
//==========================================================
//商品分类的添加
export const cateAdd = data => post('/cateadd', data,true)

//商品分类列表
export const cateList = (data) => get('/catelist', data)

//商品分类获取一条数据接口
export const getCateInfo = (data) => get('/cateinfo', data)

//商品分类修改
export const cateEdit = data => post('/cateedit', data,true)

//商品分类列表删除接口
export const cateDel = data => post('/catedelete', data)
//==========================================================
//商品规格的添加
export const specsAdd = data => post('/specsadd', data)

// 商品规格总数
export const specsCount = () => get('/specscount')

//商品规格列表
export const specsList = data => get('/specslist', data)

//商品规格获取一条数据接口
export const specsInfo = (data) => get('/specsinfo', data)

//商品规格修改
export const specsEdit = data => post('/specsedit', data)

//商品规格列表删除接口
export const specsDel = data => post('/specsdelete', data)
// =======================================================
//商品的添加
export const goodsAdd = data => post('/goodsadd', data,true)

// 商品总数
export const goodsCount = () => get('/goodscount')

//商品列表
export const goodsList = data => get('/goodslist', data)

//商品获取一条数据接口
export const goodsInfo = (data) => get('/goodsinfo', data)

//商品修改
export const goodsEdit = data => post('/goodsedit', data,true)

//商品列表删除接口
export const goodsDel = data => post('/goodsdelete', data)
//================================================================
//会员列表
export const memberList = () => get('/memberlist')
//会员获取一条数据接口
export const memberInfo = (data) => get('/memberinfo', data)
//会员修改
export const memberEdit = data => post('/memberedit', data)
//==============================================================
//轮播图的添加
export const bannerAdd = data => post('/banneradd', data, true)

//轮播图列表
export const bannerList = () => get('/bannerlist')

//轮播图获取一条数据接口
export const bannerInfo = (data) => get('/bannerinfo', data)

//轮播图修改
export const bannerEdit = data => post('/banneredit', data, true)

//轮播图列表删除接口
export const bannerDel = data => post('/bannerdelete', data)
//================================================================
//限时秒杀的添加
export const seckAdd = data => post('/seckadd', data)

//限时秒杀列表
export const seckList = () => get('/secklist')

//限时秒杀获取一条数据接口
export const seckInfo = (data) => get('/seckinfo', data)

//限时秒杀修改
export const seckEdit = data => post('/seckedit', data)

//限时秒杀列表删除接口
export const seckDel = data => post('/seckdelete', data)